package com.firefighting.dao;

import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.firefighting.entity.Building;

public interface BuildingMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Building record);

    int insertSelective(Building record);

    Building selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Building record);

    int updateByPrimaryKey(Building record);
    /**
     * @author Liuxc
     * @function 根据合同id查询建筑物list
     * **/
	List<HashMap<String, Object>> selectBuildingList(Integer contractId);
	
	/** zhyan 查询所有建筑的名称 */
	@SuppressWarnings("rawtypes")
	List<HashMap> selectAllBuilding();
   // liuxc 查询合同下的建筑物数量
	int getNumberOfContract(@Param("contractId")Integer contractId);
    //计算总面积
	int sumArea(@Param("contractId")int contractId);
   //获取合同所有建筑物id
	List<Integer> selectBuildingIdByContract(@Param("contractId")Integer contractId);
}